/*
 * Copyright @ 2024 weili23
 * com.iflytek.zhcs.assist.app.web 15:31
 * All right reserved.
 */

package com.sky.controller.user;

import com.sky.result.Result;
import com.sky.service.IWeatherService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @desc: 天气controller
 * @author: weili23
 * @createTime: 2024/12/16 15:31
 * @version: v1.0
 */
@Slf4j
@RestController
@Api(tags = "天气模块")
@RequestMapping(value = "/weather")
public class WeatherController {
    @Resource
    private IWeatherService weatherService;

    @GetMapping(value = "/getWeather")
    public Result getWeather(String cityName) {
        return Result.success(weatherService.getWeather(cityName));
    }

}
